<template>
  <div class="home">
    <el-container style="min-height: 100vh">
      <el-header style="padding: 0 0">
        <Header :user="user"></Header>
      </el-header>
      <el-main>
        <router-view></router-view>
      </el-main>
      <el-footer style="padding: 0 0">
        <Footer></Footer>
      </el-footer>
    </el-container>
  </div>
</template>

<script>
// @ is an alias to /src
import Header from "@/components/Header";
import Footer from "@/components/Footer";

export default {
  name: 'Manage',
  components: {
    Footer,
    Header
  },
  data(){
    return{
      user: {}
    }
  },
  methods:{
    getUser: function () {
      // this.user = JSON.parse(localStorage.getItem("user"))
      this.user = {
        id: 1635088985338245122,
        userName: "admin",
        avatar: "https://p.qqan.com/up/2021-6/16246735796128385.png",
        nickName: "测试账号",
        sex: 0
      }
    }
  },
  mounted() {
    this.getUser()
  }
}
</script>
